build: Rename GDK backend options
authorEmmanuele Bassi <ebassi@gnome.org>
Wed, 14 Feb 2018 14:04:04 +0000 (14:04 +0000)
committerEmmanuele Bassi <ebassi@gnome.org>
Wed, 14 Feb 2018 14:14:22 +0000 (14:14 +0000)
Drop the 'enable-' prefix, and always enable all platform-specific
backends. We can disable them depending on the platform. This way,
the documentation printed by `meson configure` remains accurate.

meson.build
meson_options.txt

index f3e0fa2f7601be60a52343760e4f5f6c48032b1a..037b78f8fae2cbd0bea009a1d2a8d073e6d312de 100644 (file)
@@ -87,27 +87,34 @@ gtk_soversion = '0.@0@.@1@'.format(gtk_binary_age - gtk_interface_age, gtk_inter
 
 gtk_api_version = '4.0'
 
-x11_enabled            = get_option('enable-x11-backend')
-wayland_enabled        = get_option('enable-wayland-backend')
-broadway_enabled       = get_option('enable-broadway-backend')
-quartz_enabled         = get_option('enable-quartz-backend')
-win32_enabled          = get_option('enable-win32-backend')
-cloudproviders_enabled = get_option('enable-cloudproviders')
+x11_enabled            = get_option('x11-backend')
+wayland_enabled        = get_option('wayland-backend')
+broadway_enabled       = get_option('broadway-backend')
+quartz_enabled         = get_option('quartz-backend')
+win32_enabled          = get_option('win32-backend')
 
 os_unix   = false
 os_linux  = false
 os_win32  = false
 os_darwin = false
 
-if host_machine.system().contains('darwin')
+# Some windowing system backends depend on the platform we're
+# building for, so we need to ensure they are disabled; in other
+# cases, they are the only windowing system available, so we need
+# to ensure they are enabled
+if host_machine.system() == 'darwin'
   os_darwin = true
+  win32_enabled = false
 elif host_machine.system() == 'windows'
   os_win32 = true
   win32_enabled = true
   x11_enabled = false
   wayland_enabled = false
-elif host_machine.system().contains('linux')
+  quartz_enabled = false
+elif host_machine.system() == 'linux'
   os_linux = true
+  win32_enabled = false
+  quartz_enabled = false
 endif
 
 os_unix = not os_win32
@@ -578,7 +585,7 @@ else
   endif
 endif
 
-
+cloudproviders_enabled = get_option('enable-cloudproviders')
 if cloudproviders_enabled
   cloudproviders_dep = dependency('cloudproviders', required: true)
   if cloudproviders_dep.found()
index 5ac89073ac5399debcdccdde2c1c61f797dfa3e5..07de49a45aad9dec7ececb1340b02d51d12b1b23 100644 (file)
@@ -1,14 +1,14 @@
 # GDK backends
-option('enable-x11-backend', type: 'boolean', value: 'true',
-  description : 'Enable the X11 gdk backend')
-option('enable-wayland-backend', type: 'boolean', value: 'true',
-  description : 'Enable the wayland gdk backend')
-option('enable-broadway-backend', type: 'boolean', value: 'false',
+option('x11-backend', type: 'boolean', value: true,
+  description : 'Enable the X11 gdk backend (only when building on Linux or macOS)')
+option('wayland-backend', type: 'boolean', value: true,
+  description : 'Enable the wayland gdk backend (only when building on Linux)')
+option('broadway-backend', type: 'boolean', value: false,
   description : 'Enable the broadway (HTML5) gdk backend')
-option('enable-win32-backend', type: 'boolean', value: 'false',
-  description : 'Enable the Windows gdk backend')
-option('enable-quartz-backend', type: 'boolean', value: 'false',
-  description : 'Enable the macOS gdk backend')
+option('win32-backend', type: 'boolean', value: true,
+  description : 'Enable the Windows gdk backend (only when building on Windows)')
+option('quartz-backend', type: 'boolean', value: true,
+  description : 'Enable the macOS gdk backend (only when building on macOS)')
 
 # Optional dependencies
 option('enable-vulkan', type: 'combo', choices : ['yes', 'no', 'auto'], value : 'auto',